package com.easy.activiti.listener;

import com.easy.activiti.ext.TaskEvent;
import org.activiti.engine.delegate.event.ActivitiEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author zhouchuang
 * 2024-11-05 10:54:05
 */
public class TaskCreateListener extends AEventHandler {
    protected Logger logger = LoggerFactory.getLogger(getClass());

    @Override
    public void handle(ActivitiEvent event) {
        System.out.println("===========Task Create=============");
        TaskEvent taskEvent = dispatchEvent(event);
        getActuator(taskEvent.getProcessDefinitionKey()+"created").execute(taskEvent);
    }

}